##coding=utf-8

import sys

s_gbk = '汉'
s_unicode = u'汉'

# 打印为乱码
print 's_gbk:',s_gbk

print 's_unicode:',s_unicode

# turn into unicode from gbk
print s_gbk.decode('gbk')

# turn into gbk from unicode
print s_unicode.encode('gbk')

# turn into utf-8 from unicode
print s_unicode.encode('utf-8')

isinstance(s_gbk,unicode)
isinstance(s_unicode,unicode)

print sys.getdefaultencoding()

